{% extends "departamento/index.html" %}
{% load i18n %}
{% block title %}{% trans 'Listar Docentes (Departamento)'%}{% endblock %}
{% block breadcrumb %}
<ul class="breadcrumb">
	<li>
		<span class="glyphicon glyphicon-home"></span> <a tabindex="2" href="{% url homeDepartamento %}" title="{% trans 'Home' %}">{% trans 'Home' %}</a>
	</li>
	<li class="active">{% trans 'Listar Docentes' %}</li>
</ul>
{% endblock %}

<!-- Estes blocos é para alterar a classe do menu do index, refere se está ou não activo -->
{% block Listar %}active{% endblock %}
{% block MenuInformacao %} {% endblock %}

{% block filtros %}
<div class="list-group">
  
  <a href="#" class="list-group-item active">Categoria</a>
  {% include "recursosHumanos/elements/filter_cat.html" %}

</div>

{% endblock %}

{% block content %}
<div class="page-header whiteText">
  <h1>{% trans 'Lista de Docentes '%}</h1>
</div>
{%comment%}
<table class="tabela_sumario">
	
	<tr class="search" >
		<th colspan="6" class="top_sumario"> {% csrf_token %}
		<form action="" onkeypress="testeSearch()" method="get" name="searchForm">
			<img src="/static/images/selector-search.gif" title="search" alt="searchIcon" />
			<input name="searchField"  id="searchField" required type="search" value="{{keyword}}" />
			<input id="submitSearch" value={%trans 'Search'%} name="Submit" type="submit" />
			{% if keyword != None%}
				<span>- Pesquisa por "{{keyword}}"</span>
				{% endif %}
				<span>- {{sizeList}} resultados encontrados</span>
		</form></th>
{%endcomment%}

<table cellpadding="0" cellspacing="0" border="0" class="display sumary_table" id="special_table" width="100%">
<thead>
	<tr class="cabecalho_sumario">
		<th>ID</th>
		<th class="cabecalho_sumario">Docente</th>
		<th class="cabecalho_sumario">Horas Distribuidas</th>
		<th class="cabecalho_sumario">Turmas</th>
	</tr>
</thead>
<tbody>
	{% for id_Docente, nome, turmas, horas  in listInfo %}
	<tr>
		<td ><a href="{{id_Docente}}"><span class="view">{{id_Docente}}</span></a></td>
		<td class="teacher_name_field"><a href="{{id_Docente}}">{{nome}}</a></td>
		
		<td {% if horas < 180  %} 
		class="hoursDownLimit"
		title="Inferior ao limite (< 180)"
		{% elif horas > 360 %}
		class="hoursUpLimit"
		title="A exceder o limite (> 360)"
		{% endif %}
		>{{horas}}</td>
		
		<td>{{turmas}}</td>
		
	
	</tr>
	{% endfor %}
</tbody>
</table>

<script type="text/javascript">
$(document).ready(function() {
	$('#special_table').dataTable({
		"oLanguage": {
            "sUrl": "/static/dataTables/lang/pt-pt.txt"
        },
         "sPaginationType": "full_numbers",
         "sDom": '<"dataTables_special_bar"l><"dataTables_special_bar"if><"whiteBox"rt><"pagination_box"p>'
        
        	
	});
	$('.hasTooltip').tooltip({"container": false});
} );
</script>
{% endblock %}